VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Obj1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Public repName As String
Public stdName As String
Public xsdOrder As Integer
Public preOrder As Long
Public category As Integer
Public levels As Integer
Public preRelTot As Integer
Dim pRels() As XbrlPreRel
Property Let preRels(pr() As XbrlPreRel)

pRels = pr

End Property
Property Get preRels() As XbrlPreRel()

preRels = pRels

End Property

Sub init()

ReDim pRels(0)

End Sub
Sub estOrder(pr() As XbrlPreRel)

pRels = pr
Utilities.quickSortTxtObj pRels, 1, UBound(pRels), 6
orderLevels 0
Utilities.quickSort pRels, 1, preRelTot, 4

End Sub
Sub orderLevels(pRelNo As Integer)

Dim childPreRelRange() As Integer
Dim i As Integer

childPreRelRange = Utilities.binRangeSrchTxtObj(6, pRels(pRelNo).tag, pRels)
If childPreRelRange(1) > 0 Then
    levels = levels + 1
    If childPreRelRange(1) < childPreRelRange(2) Then
        Utilities.quickSort pRels, childPreRelRange(1), childPreRelRange(2), 2
    End If
    For i = childPreRelRange(1) To childPreRelRange(2)
        preRelTot = preRelTot + 1
        testt = pRels(i).tag
        pRels(i).preOrder = preRelTot
        teste = pRels(i).eleOrder
        pRels(i).level = levels
        orderLevels i
    Next i
    levels = levels - 1
End If

End Sub
Property Get compkey(keyNo As Integer) As Variant

Select Case keyNo
    Case 0
        compkey = preOrder
    Case 2
        compkey = preOrder
    Case 3
        compkey = stdName
End Select

End Property
